package com.fBlog.pojo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;


@Entity  
@Table(name="tuser")  
@DynamicInsert(true)
@DynamicUpdate(true)
public class Tuser implements java.io.Serializable{  
  
    //创建时间
	private Date createTime;  
      
    private String id; 
    
    private String password;  
    
	private String role;
    
    private String userName;
    //所属家庭
    private Tfamily family;
    
    

	public Date getCreateTime() {
		return createTime;
	}

	@Id
	@Column(name = "ID", nullable = false, length = 36)
    public String getId() {  
        return id;  
    }

	public String getPassword() {
		return password;
	}

    public String getRole() {
		return role;
	}

	@Column(length = 2550)
	public String getUserName() {  
        return userName;  
    }  
  
    public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}  
  
    public void setId(String id) {  
        this.id = id;  
    }  
  
    public void setPassword(String password) {
		this.password = password;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public void setUserName(String userName) {  
        this.userName = userName;  
    }

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "FAMILYID")
	public Tfamily getFamily() {
		return family;
	}

	public void setFamily(Tfamily family) {
		this.family = family;
	}  
}  
